× Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Lesson 9 Lesson 10 Lesson 11 Lesson 12 Lesson 13 Lesson 14 Lesson 15 Lesson 16

All lessons

Lesson 3 - Variables

One of the key concepts of many languages, not just Python, are variables. Variables are basically are values set by you, and its name is determined by you. The basic syntax, aka the proper "grammar" of programming, of it is like so:

(name of variable) = (some form of data, such as numbers)

Without the parenthesises of course

Try setting the word "number," without quotations, equal to any number that you would like

After you have set the your variable to what you want, output it by running:

print(number)

Another cool thing about variables is that you can change the value of a variable, try this out by setting the number variable to a different number and once again run:

print(number)